/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package questionbook.Configuration;

import java.io.IOException;
import java.util.Properties;

/**
 * QuestionbookConfiguration provides Access to the Configuration File
 * Questionbook.properties
 *
 * @author stefanstift
 */
public class QuestionbookConfiguration {

    private static QuestionbookConfiguration instance;
    private Properties config;

    protected QuestionbookConfiguration() {

        this.config = new Properties();
        this.loadConfig();
    }

    public static QuestionbookConfiguration getInstance()
    {
        if(instance == null)
            instance = new QuestionbookConfiguration();

        return instance;
    }

    private void loadConfig()
    {
        try {
               this.config.load(getClass().getResourceAsStream("Questionbook.properties"));
        } catch (IOException e)
       {
            System.out.println("Error reading properties");
            e.printStackTrace();
       }
    }

    /**
     *
     * @return  the specified BaseURl for the whole Ontology
     */
    public String getBaseURL()
    {
        return this.config.getProperty("baseURL");
    }

    /**
     *
     * @return the official URL of the FOAF Namespace
     */
    public String getFoafURL()
    {
        return this.config.getProperty("foafURL");
    }

   /**
    *
    * @return the absolute Path to the Ontology File
    */
    public String getStorePath()
    {
        return this.config.getProperty("storePath");
    }

    /**
     *
     * @return the Label for the answer-option "SURE"
     */
    public String getSureLabel()
    {
        return this.config.getProperty("sureLabel");
    }

    /**
     *
     * @return the Label for the answer-option "THINK"
     */
    public String getThinkLabel()
    {
        return this.config.getProperty("thinkLabel");
    }

    /**
     *
     * @return the Label for the comment-option "THINK RIGHT"
     */
    public String getThinkRightLabel()
    {
        return this.config.getProperty("thinkRightLabel");
    }

    /**
     *
     * @return the Label for the comment-option "THINK WRONG"
     */
    public String getThinkWrongLabel()
    {
        return this.config.getProperty("thinkWrongLabel");
    }

    /**
     *
     * @return the Label for the comment-option "SURE RIGHT"
     */
    public String getSureRightLabel()
    {
        return this.config.getProperty("sureRightLabel");
    }

    /**
     *
     * @return the Label for the comment-option "SURE WRONG"
     */
    public String getSureWrongLabel()
    {
        return this.config.getProperty("sureWrongLabel");
    }

    /**
     * 
     * @return the Label for the comment-option "SIGN"
     */
    public String getSignLabel()
    {
        return this.config.getProperty("signLabel");
    }

    




}
